package gen

import (
	"xian-server/lib/middleware"

	"xian-server/gen/base/usr"

	"github.com/gin-gonic/gin"
)

func InitGenRoutes(r *gin.RouterGroup) {

	genRouter := r.Group("/")
	genRouter.Use(middleware.JWT())
	{
		// 用户
		genRouter.GET("/base/usr", usr.FindAll)
		genRouter.POST("/base/usr", usr.Create)
		genRouter.PUT("/base/usr/:id", usr.UpdateById)
		genRouter.DELETE("/base/usr/:id", usr.DeleteById)
	}
}
